package lab02.test20;

import java.util.Scanner;

/**
 * Created by V555 on 2017/10/29.
 */
public class Test {
    public static void main(String[] args) {
        char tmp;
        //输入一行含有数字和字符的字符串
        System.out.print("输入字符串:");
        Scanner scanner=new Scanner(System.in);
        String s=scanner.nextLine();
        //仅输出字符串中的全部数字字符
        for (int i=0;i<s.length();i++){
            tmp=s.charAt(i);
            if (tmp>='0'&&tmp<='9')
            System.out.print(tmp);
        }

    }
}
